import Vue from "vue";
import Router from "vue-router";
import NavHeader from "@/components/NavHeader";
import home from "./../pages/home.vue";
import personal from "@/pages/personal";
import safety from "@/pages/safety";
import register from "@/pages/register";
import login from "@/pages/login";
import func from "@/pages/func";
import order from "@/pages/order";
import zcapi from "@/pages/zcapi";
import zcInterface from "@/pages/zcInterface";
import detail from "@/pages/detail";
import projectList from "@/pages/projectList";
import autoInterface from "@/pages/autoInterface";
import interfaceList from "@/pages/interfaceList";
import interfaceDetail from "@/pages/interfaceDetail";
import report from '@/pages/report'
import main_page from '@/components/main_page'
import count from '@/pages/count'
import testReport from '@/pages/testReport'
import projectManager from '@/pages/projectManager'


// 配置路由
Vue.use(Router);

const originaOush = Router.prototype.push;

Router.prototype.push = function push(location) {
  return originaOush.call(this, location).catch(err => err);
};

export default new Router({
  routes: [
    {
      path: "/projectManager",
      name: "projectManager",
      component: projectManager
    
    },
    {
      path: "/testReport",
      name: "testReport",
      component: testReport
    },

    
    {
      path: "/",
      name: "NavHeader",
      component: NavHeader
    },
    {
      path: "/home",
      name: "home",
      component: home
    },
    {
      path: "/personal",
      name: "personal",
      component: personal
    },
    {
      path: "/safety",
      name: "safety",
      component: safety
    },
    {
      path: "/register",
      name: "register",
      component: register
    },
    {
      path: "/login",
      name: "login",
      component: login
    },

    {
      path: "/func",
      name: "func",
      component: func
    },
    {
      path: "/order",
      name: "order",
      component: order
    },
    {
      path: "/zcapi",
      name: "zcapi",
      component: zcapi
    },
    {
      path: "/zcInterface",
      name: "zcInterface",
      component: zcInterface
    },
    {
      path: "/detail",
      name: "detail",
      component: detail
    },
    {
      path: "/projectList",
      name: "projectList",
      component: projectList
    },
    {
      path: "/autoInterface",
      name: "autoInterface",
      component: autoInterface
    },
    {
      path: "/interfaceList",
      name: "interfaceList",
      component: interfaceList
    },
    {
      path: "/interfaceDetail",
      name: "interfaceDetail",
      component: interfaceDetail
    },
    
    {
      path: "/report",
      name: "report",
      component: report
    },
    
    {
      path: "/main_page",
      name: "main_page",
      component: main_page
    },
    {
      path: "/count",
      name: "count",
      component: count
    },
  ]
});



